Ext.namespace('Ext.ux.form');

Ext.ux.form.IpAddressField = Ext.extend(Ext.form.TextField, {
	vtype : 'ip'
});

Ext.form.VTypes['ipRegexp'] = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
Ext.form.VTypes['ip'] = function(v) {
	return Ext.form.VTypes['ipRegexp'].test(v);
};
Ext.form.VTypes['ipText'] = 'This field should only contain numbers and .';
Ext.form.VTypes['ipMask'] = /[0-9.]/i;
